<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>刘一手总店管理</title>
    <base href="<%=basePath%>">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="A_Style/Style.css" rel="stylesheet" type="text/css" />
</head>

 <script type="text/javascript">
    function showconfirmDialog(){
      if(${requestScope.source eq '修改' }){
      	confirm("${requestScope.Msg}")
      }
    }
</script>

<body onload="showconfirmDialog()">
<%int i=0; %>
<center>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td height="60" bgcolor="#E6F5FF" style="color:#06F; font-size:19px; font-weight:bolder; padding-left:50px;">刘一手总店管理系统</td>
    </tr>
    <tr>
      <td height="30" background="images/MenuBg.jpg">当前用户：&nbsp;${sessionScope.name}</td>
    </tr>
    <tr>
      <td height="400" align="left" valign="top">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="191" height="500" align="left" valign="top" background="images/leftbg.jpg">
          <%@ include file="Left.jsp"%>
          </td>
          <td width="100%" align="left" valign="top" bgcolor="#F6F9FE" colspan="2">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="30" background="images/mainMenuBg.jpg" style="padding-left:25px;">用户管理</td>
            </tr>
            <tr>
              <td height="470" align="center" valign="top" bgcolor="#F6F9FE">
              
              <form name="form1" method="post" action="SearchSer">
                <table width="100%%" border="0" cellspacing="0" cellpadding="0">
                  <tr align="center">
                    <td width="44%">查询：
                      <select name="SearchRow" id="SearchRow">
                        <option value="name" selected="selected">用户姓名</option>
                        <option value="phone">用户手机</option>
                        <option value="email">用户email</option>
                      </select>
                      <input name="Search" type="text" class="text1" id="Search">
                      <input name="pre" type="hidden" value="user">
                      <input type="submit" name="button" id="button" value="点击查询">
                    </td>
                   </tr>
                </table>
              </form>
              
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr align="center"  class="t1">
                    <td height="25" bgcolor="#D5E4F4" align="center"><strong>编号</strong></td>
                    <td bgcolor="#D5E4F4" align="center"><strong>用户姓名</strong></td>
                    <td bgcolor="#D5E4F4" align="center"><strong>用户手机</strong></td>
                    <td bgcolor="#D5E4F4" align="center"><strong>用户email</strong></td>
                    <td bgcolor="#D5E4F4" align="center"><strong>用户密码</strong></td>
                    <td bgcolor="#D5E4F4" align="center"><strong>操作</strong></td>
                  </tr>
                  <c:forEach items="${requestScope.users}" var="user" varStatus="id">
                    <tr align="center">
                      <td height="25" align="center"><%=i++ %></td>
                      <td>${user.name}</td>
                      <td>${user.phone}</td>
                      <td>${user.email}</td>
                      <td>${user.password}</td>
                      <td align="center"><a href="vipManegerSer?status=update&name=${user.name}"><font color="blue">修改</font></a> <a href="vipManegerSer?status=del&name=${user.name}" onClick="return confirm('确定要删除该用户吗？')"><font color="blue">删除</font></a></td>
                    </tr>
                  </c:forEach>
                </table>
                
                
                <br/>
                <br/>
                <br/>
                <c:choose>
				<c:when test="${sessionScope.currentPage==1}">
				</c:when>
				<c:otherwise>
				<a href="MenuSer?status=vip&currentPage=1"><input type="button" value="首页"/></a>&nbsp;&nbsp;
				<a href="MenuSer?status=vip&currentPage=${sessionScope.currentPage-1}"><input type="button" value="上一页"/></a>&nbsp;&nbsp;
				</c:otherwise>
				</c:choose>
				<c:choose>
				<c:when test="${sessionScope.currentPage==sessionScope.countPage}">
				</c:when>
				<c:otherwise>
				<a href="MenuSer?status=vip&currentPage=${sessionScope.countPage}"><input type="button" value="尾页"/> </a>&nbsp;&nbsp;
				<a href="MenuSer?status=vip&currentPage=${sessionScope.currentPage+1}"><input type="button" value="下一页"/> </a>&nbsp;&nbsp;
				</c:otherwise>
				</c:choose>
				
                </td>
            </tr>
          </table></td>
        </tr>
      </table></td>
    </tr>
    <td height="25" background="images/bootBg.jpg" align="center">
		 	<p>© 长江师范学院||软件服务与外包1班||   徐瑜小组</p>
	</td>
  </table>

</center>
</body>
</html>
